﻿import flash.external.*

var obj_list:Array = new Array(); //set_tab;[num,num] 几VS几
var text_list:Array = new Array();
text_list = [text0,text1,text2,text3,text4,text5,text6,text7];
var text_player:Array = new Array();//当前玩家名列表
var init_x:Number=0;
var init_y:Number=100;


function init_tab(){
	line0._alpha = 0;
	line1._alpha = 0;
	for(var i:Number = 0;i<text_list.length;i++){
		text_list[i]._alpha = 0;
		text_list[i].player.text = "玩家";
		text_list[i].kill.text = "0";
		text_list[i].dead.text = "0";
	}
}

function set_tab_pos(){
	init_tab();
	sum = 0;
	for(var i:Number = 0;i<obj_list.length;i++){
		this["line"+i]._x = init_x;
		this["line"+i]._y = init_y; 
		this["line"+i]._alpha = 100;
		init_y += 20;
		for(var j:Number = 0;j<obj_list[i];j++){
			text_list[sum].player.text = text_player[sum];
			text_list[sum]._x = init_x;
			text_list[sum]._y = init_y;
			text_list[sum]._alpha = 100;
			init_y += 40;
			sum+=1;
		}
		init_y +=20;
		
	}
}
function set_tab_kill(side:Number,va:Number){
	text_list[side].kill.text = va;
}
function set_tab_dead(side:Number,va:Number){
	text_list[side].dead.text = va;
}
//obj_list = [2,2];
//text_player= ["a","b","c","d"];
//set_tab_pos();
title_name.text = "玩家";
title_kill.text = "杀敌数";
title_dead.text = "死亡数";

